<template>
	<!-- 专供理赔二核影像列表 -->
	<div class="fillcontain">
		<el-dialog title="影像列表" :visible.sync="drawer" :direction="direction" :width="'90%'" :height="'90%'" :before-close="handleClose"
		 center>
			<!-- <div class="contain"> -->
			<!-- 表格 -->
			<div class="contain">
				<el-row>
					<el-col :span="6">
						<div>
							<!-- tree菜单控件 -->
							<el-tree :data="treeData" show-checkbox node-key="id" ref="tree" check-strictly default-expand-all @check-change="checkChange"
							 @node-click="nodeClick">
							</el-tree>
						</div>
					</el-col>
					<el-col :span="18">
						<div class="contain bor_top">
							<el-row>
								<el-col :span="24" class="pb15">
									<el-button type="danger" class="Defaultbutton" @click="bathchShow_newObject()">查看</el-button>
								</el-col>
							</el-row>
							<div class="table_container pl30">

								<el-table ref="multipleTable" @selection-change="handleSelectionChange" v-loading="loading" :data="tableDataList"
								 highlight-current-row header-cell-class-name="table-header-class" style="width:100%">
									<el-table-column fixed type="selection" width="55">
									</el-table-column>
									<el-table-column min-width="60" show-overflow-tooltip label="备注" align='center'>
										<template slot-scope="scope">
											<span class="operationIcon" @click="memoGo(scope.row.busiType, scope.row.itemid)">
												<i v-if="!scope.row.remark" class="el-icon-tickets"></i>
												<i v-if="scope.row.remark" class="el-icon-info"></i>
											</span>
										</template>
									</el-table-column>
									<el-table-column label="记录" width="60" show-overflow-tooltip align='center'>
										<template slot-scope="scope">
											<span class="operationIcon" @click="updateRecordGo(scope.row.busiType, scope.row.itemid)">
												<i class="el-icon-edit-outline"></i>
											</span>
										</template>
									</el-table-column>
									<el-table-column min-width="120" property="serno" label="流水号" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column min-width="220" property="docTyp" label="文件类型" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column min-width="100" property="scanDate" label="扫描日期" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column min-width="80" property="scanTime" label="扫描时间" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column width="80" label="是否列印" align='center'>
										<template slot-scope="scope">
											<span v-if="scope.row.isPrint == 0">N</span>
											<span v-if="scope.row.isPrint == 1">Y</span>
										</template>
									</el-table-column>
									<el-table-column min-width="150" property="stockID" label="存仓号码" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column min-width="120" property="groupNo" label="组号" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column width="100" label="是否新受理" align='center'>
										<template slot-scope="scope">
											<span v-if="scope.row.subbusitype == ''">&nbsp;&nbsp;&nbsp;&nbsp;</span>
											<span v-else>{{scope.row.subbusitype}}</span>
										</template>
									</el-table-column>
									<el-table-column min-width="120" property="remark" label="最新备注" align='center' show-overflow-tooltip>
									</el-table-column>
									<el-table-column fixed="right" width="50" label="影像" min-width="60" show-overflow-tooltip align='center'>
										<template slot-scope="scope">
											<span class="operationIcon" @click="showImage_newObject(scope.row)">
												<i class="el-icon-camera"></i>
											</span>
										</template>
									</el-table-column>
									<el-table-column fixed="right" width="100" property="address" label="操作" align='center'>
										<template slot-scope="scope">
											<el-button type="text" size="small" @click="imagInfoGo(
                                    scope.row.busiType,
                                    scope.row.policyNo,
                                    scope.row.busiNo,
                                    scope.row.subbusitype,
                                    scope.row.productType,
                                    scope.row.docTyp,
                                    scope.row.stockID,
                                    scope.row.groupNo,
                                    scope.row.scanDate,
                                    scope.row.scanTime,
                                    scope.row.isPrint,
                                    scope.row.ishcprint,
                                    scope.row.version,
                                    scope.row.itemid,
                                    scope.row.agentNo,
                                    scope.row.updateflag,
                                    scope.row.company
                                )">影像信息
											</el-button>
										</template>
									</el-table-column>
								</el-table>
								<!-- 分页信息 -->
								<el-row>
									<!-- <el-col :span="4" class="button_pagination">
              <el-button type="primary" @click="bathchShow_newObject()">查看</el-button>
            </el-col> -->
									<el-col :span="24">
										<div class="pagination">
											<el-pagination background v-if='paginations.total > 0' :page-sizes="paginations.pageSizes" :page-size="paginations.pageSize"
											 :layout="paginations.layout" :total="paginations.total" :current-page='paginations.pageIndex'
											 @current-change='handleCurrentChange' @size-change='handleSizeChange'>
											</el-pagination>
										</div>
									</el-col>
								</el-row>
								<el-row>
									<el-col :span="24" class="pb15">
										<el-button type="danger" class="Defaultbutton" @click="bathchShow_newObject()">查看</el-button>
									</el-col>
								</el-row>
							</div>
						</div>
					</el-col>
				</el-row>
			</div>
			<!-- </div> -->
		</el-dialog>


		<!-- 弹框 备注列表 memoList-->
		<el-dialog title="备注列表" :visible.sync="memoListDialog" width="60%" center>
			<el-row>
				<el-col :span="24" class="pb15 pt5">
					<el-button type="danger" plain @click="addMemoInfoDialog = true, MemoInfoDialogShow = true, MemoInfoDialogHistory = false">新增备注
					</el-button>
					<!-- <el-button type="danger" plain  @click="addMemoInfoDialog = true">新增备注</el-button> -->
					<el-button type="danger" plain @click="memoGoHistory()" hidden>查看历史备注</el-button>
				</el-col>
				<div v-if="addMemoInfoDialog">
					<el-row>
						<el-input clearable type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容" v-model="remarkInfo">
						</el-input>
					</el-row>
					<el-row>
						<el-col :span="12" class="pb15 pt15 pr10 text_right">
							<el-button type="danger" plain @click="addMemoInfoDialog = false">取消</el-button>
						</el-col>
						<el-col :span="12" class="pb15 pt15 pr10 text_left">
							<el-button type="danger" class="Defaultbutton" @click="addMemoInfo()">保存</el-button>
						</el-col>
					</el-row>
				</div>
				<el-col :span="24" v-if="MemoInfoDialogShow">
					<el-table :data="memoListTableData" style="width: 100%">
						<el-table-column min-width="80" prop="serialNumber" label="序号">
						</el-table-column>
						<el-table-column min-width="120" prop="userid" label="备注人员" show-overflow-tooltip>
						</el-table-column>
						<el-table-column prop="time" label="备注时间" min-width="150" show-overflow-tooltip>
						</el-table-column>
						<el-table-column min-width="120" prop="remark" label="备注信息" align='center' show-overflow-tooltip>
						</el-table-column>
					</el-table>
				</el-col>
			</el-row>
			<span slot="footer" class="dialog-footer">
				<el-button @click="memoListDialog = false,MemoInfoDialogHistory=false,MemoInfoDialogShow=false,addMemoInfoDialog=false"
				 class="Defaultbutton">关闭</el-button>
			</span>
		</el-dialog>
		<el-dialog title="查看历史备注" :visible.sync="MemoInfoDialogHistory" width="40%" center>
			<!-- 历史备注 -->
			<el-col :span="24">
				<el-input type="textarea" autosize placeholder="请输入内容" v-model="sNoteLog"></el-input>
			</el-col>
			<span slot="footer" class="dialog-footer">
				<el-button @click="MemoInfoDialogHistory=false" class="Defaultbutton">关闭</el-button>
			</span>
		</el-dialog>
		<!-- 弹框 添加备注信息 -->
		<!-- 		<el-dialog title="添加备注信息" :visible.sync="addMemoInfoDialog" width="60%" center>
      <el-row>
        <el-col :span="24">
          <el-form ref="form" label-width="120px">
            <el-form-item label="添加备注信息">
              <el-input clearable type="textarea" v-model="remarkInfo"></el-input>
            </el-form-item>
          </el-form>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addMemoInfoDialog = false">取消</el-button>
        <el-button @click="addMemoInfo()" class="Defaultbutton">提交</el-button>
      </span>
    </el-dialog> -->
		<!-- 弹框 修改记录 -->
		<el-dialog title="修改记录" :visible.sync="updateRecordDialog" width="60%" center>
			<el-row>
				<el-col :span="24">
					<el-table :data="updateRecordTableData" style="width: 100%">
						<el-table-column min-width="80" prop="serialNumber" label="序号">
						</el-table-column>
						<el-table-column min-width="120" prop="fielddesc" label="字段名称" show-overflow-tooltip>
						</el-table-column>
						<el-table-column min-width="120" prop="srcvalue" label="原值" width="120" show-overflow-tooltip>
						</el-table-column>
						<el-table-column min-width="120" prop="modusrid" label="操作员" align='center' show-overflow-tooltip>
						</el-table-column>
						<el-table-column min-width="160" prop="modvalue" label="修改值" align='center' show-overflow-tooltip>
						</el-table-column>
						<el-table-column prop="modtime" label="操作时间" align='center' min-width="160">
						</el-table-column>
					</el-table>
				</el-col>
			</el-row>
			<span slot="footer" class="dialog-footer">
				<el-button @click="updateRecordDialog = false" class="Defaultbutton">关闭</el-button>
			</span>
		</el-dialog>
		<!-- 弹框 影像信息 -->
		<el-dialog title="影像信息" :visible.sync="imagInfoDialog" width="60%" center>
			<el-form ref="form" label-width="140px" :model="imagInfoParams">
				<el-row class="baseInfo">
					<el-col :span="12">
						<el-form-item label="业务类型">
							<!-- <el-input disabled v-model="imagInfoParams.busiType" placeholder=""></el-input> -->
							<el-select v-model="imagInfoParams.busiType" placeholder="" :disabled="disableParam.busiType">
								<el-option v-for="item in busiTypeList" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="保单号">
							<el-input v-model="imagInfoParams.policyNo" placeholder="请输入内容" :disabled="disableParam.policyNo"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="受理号">
							<el-input v-model="imagInfoParams.busiNo" placeholder="请输入内容" :disabled="disableParam.busiNo"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="单证类型">
							<el-input v-model="imagInfoParams.docTyp" placeholder="电子投保书（意外健康险）" :disabled="disableParam.docTyp"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="存仓号码">
							<el-input v-model="imagInfoParams.stockID" placeholder="" :disabled="disableParam.stockID"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="组号">
							<el-input v-model="imagInfoParams.groupNo" placeholder="请输入内容" :disabled="disableParam.groupNo"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="是否新受理">
							<el-select v-model="imagInfoParams.subbusitype" placeholder="" :disabled="disableParam.subbusitype">
								<el-option v-for="item in imagInfoDialogSubbusitype" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="险种类型">
							<el-select v-model="imagInfoParams.productType" placeholder="" :disabled="disableParam.productType">
								<el-option v-for="item in imagInfoDialogProductType" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="是否列印(有效性)">
							<el-select v-model="imagInfoParams.isPrint" placeholder="" :disabled="disableParam.isPrint">
								<el-option v-for="item in isPrintList" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="是否打印HardCopy">
							<el-select v-model="imagInfoParams.ishcprint" placeholder="" :disabled="disableParam.ishcprint">
								<el-option v-for="item in isPrintList" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="版本">
							<el-input v-model="imagInfoParams.version" placeholder="请输入内容" :disabled="disableParam.version"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="扫描日期">
							<el-date-picker :disabled="disableParam.scanDate" value-format="yyyy-MM-dd" v-model="imagInfoParams.scanDate"
							 type="date" placeholder="选择日期" id="scanDate">
							</el-date-picker>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="扫描时间">
							<el-time-select :disabled="disableParam.scanTime" v-model="imagInfoParams.scanTime" :picker-options="{
                        start: '00:00',
                        step: '00:15',
                        end: '24:00'
                    }"
							 placeholder="选择时间" id="scanTime">
							</el-time-select>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="imagInfoDialog = false">取消</el-button>
				<el-button :disabled="disableParam.btnCopy" @click="imageInfoAlter('copy')" class="Defaultbutton">拷贝</el-button>
				<el-button :disabled="disableParam.btnModify" @click="imageInfoAlter('modify')" class="Defaultbutton">修改</el-button>
				<el-button :disabled="disableParam.btnDel" @click="imageInfoAlterDelJudge('del')" class="Defaultbutton">删除</el-button>
			</span>
		</el-dialog>

		<div id="imgObjDiv">&nbsp;</div>
	</div>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	import constant from '@/utils/constant';
	// 导入CMImage影像公用js组件
	import sunCMImage from '@/utils/sunCMImage';
  import {formatDate, strLength} from '@/utils/mUtils';
  import {
    getDocTypeMap,
    getSsyOrgMap,
    ImageExtendAlter,
    ImageExtendCheck,
    ImageQuerySearch, recordLogInfo
  } from "@/api/taskCenter/taskCommon";
 	
	export default {
		name: "clm-image-list",
		data() {
			return {
				// 查询条件
				direction: 'rtl',
				label:'',
				item:{},
				searchParams: {
					//业务查询条件
					busiNO: '', //受理号
					policyNO: '', //保单号
					policyer: '', //投保人姓名
					insured: '', //被保险人姓名
					//影像查询条件
					stockID: '', //存仓号码
					groupNO: '', //组号
					begintime: '', //扫描日期
					serno: '', //电子标识号
					policyno16: '', //短期险保单号
					//辅助条件
					busiType: '', //业务类型
					birthday: '', //被保险人出生日期
					comCode: '', //分支公司
					productType: '', //险种类型
					isPrint: '', //是否列印（有效性）
					imgsortorder1: '', //排序条件1
					imgsortorder2: '', //排序条件2
					imgsortorder3: '', //排序条件3
					imgsort: '', //排序方式
					docType: '', //文件类型
					isNoCaseno: '', //是否查询无受理号的补充文件

					branchCode: '', //分支公司
					stype: '', //文件类型
					spurview: '', //查看权限

					sdocType: '', //文件类型
					sproductType: '' //险种类型
				},
				//tree 树——业务信息
				formParams: {
					busiNO: '', //受理号
					policyNO: '', //保单号
					comCode: '', //分支公司
					policyer: '', //投保人姓名
					insured: '', //被保险人姓名
					branchCode: '10' //分支公司
				},
				//树——影像列表
				treeParams: {
					begintime: '',
					busiNO: '',
					busiType: '',
					docType: '',
					doflag: '',
					groupNO: '',
					isPrint: '',
					policyno16: '',
					productType: '',
					stockID: '',

					policyNO: '',
					serno: '',
					comCode: '',
					imgsortorder1: '', //排序条件1
					imgsortorder2: '', //排序条件2
					imgsortorder3: '', //排序条件3
					imgsort: '',
					isNoCaseno: ''
				},
				//辅助条件——业务类型选择
				busiTypeList: [{
					value: 'ALL',
					label: '全部'
				}, {
					value: 'NB',
					label: '投保'
				}, {
					value: 'POS',
					label: '保全'
				}, {
					value: 'CLM',
					label: '理赔'
				}],
				//辅助条件——险种信息选择
				productTypeList: [{
					value: '传统寿险',
					label: '传统寿险'
				}, {
					value: '意外险',
					label: '意外险'
				}, {
					value: '投资连结',
					label: '投资连结'
				}, {
					value: '重填',
					label: '重填'
				}, {
					value: '变更',
					label: '变更'
				}, {
					value: 'VIP件',
					label: 'VIP件'
				}, {
					value: '绩优agent',
					label: '绩优agent'
				}],
				//影像信息-险种信息选择
				imagInfoDialogProductType: [{
					value: '传统寿险',
					label: '传统寿险'
				}, {
					value: '意外险',
					label: '意外险'
				}, {
					value: '银行险',
					label: '银行险'
				}, {
					value: '重填',
					label: '重填'
				}, {
					value: '变更',
					label: '变更'
				}, {
					value: '投资连结',
					label: '投资连结'
				}],
				//辅助条件——是否列印（有效性）选择
				isPrintList: [{
					value: '1',
					label: '是'
				}, {
					value: '0',
					label: '否'
				}],
				//是否新受理
				imagInfoDialogSubbusitype: [{
					value: 'Y',
					label: '是'
				}, {
					value: 'N',
					label: '否'
				}],
				//辅助条件——排序条件1
				imgsortorder1List: [{
					value: 'srisk',
					label: '险种类型'
				}, {
					value: 'sgroupno',
					label: '组号'
				}, {
					value: 'sdoctype',
					label: '文件类型'
				}, {
					value: 'sscandate',
					label: '扫描日期'
				}, {
					value: 'sscantime',
					label: '扫描时间'
				}, {
					value: 'sdepotno',
					label: '存仓号码'
				}, {
					value: 'sbusino',
					label: '业务索引'
				}, {
					value: 'spolicyno',
					label: '保单号码'
				}, {
					value: 'sscansite',
					label: '扫描机构'
				}, {
					value: 'sstationed',
					label: '扫描工作站'
				}, {
					value: 'snbtrigger',
					label: '是否触发录单'
				}, {
					value: 'sdocno',
					label: '文件索引'
				}, {
					value: 'sishcprint',
					label: '是否需HardCopy打印'
				}, {
					value: 'ssubbtype',
					label: '是否新受理'
				}, {
					value: 'scompanyid',
					label: '分公司'
				}, {
					value: 'sisprint',
					label: '是否列印'
				}, {
					value: 'sversion',
					label: '版本号'
				}],
				//辅助条件——排序条件2
				imgsortorder2List: [{
					value: '',
					label: ''
				}, {
					value: '',
					label: ''
				}],
				//辅助条件——排序条件3
				imgsortorder3List: [{
					value: '',
					label: '险种类型'
				}, {
					value: '',
					label: ''
				}],
				//辅助条件——排序方式
				imgsortList: [{
					value: '',
					label: '升序'
				}, {
					value: 'desc',
					label: '降序'
				}],
				//机构对象——分支公司
				ssyMap: {},
				//查询条件
				rules: {
					busiNO: '', //受理号
					policyer: '', //投保人姓名
					insured: '', //被保险人姓名
					policyNO: '', //保单号

					begintime: '', //扫描日期
					serno: '', //电子标识号
					stockID: '', //存仓号码
					groupNO: '', //组号
					policyno16: '', //短期险保单号

					birthday: '', //被保险人出生日期
					branchCode: '', //支公司（默认10）
					busiType: '', //业务类型
					comCode: '', //分支公司
					docType: '', //文件类型
					doflag: '', //显示查询结果类型（列表还是树形）
					imgsort: '', //排序方式
					imgsortorder1: '', //排序条件1
					imgsortorder2: '', //排序条件2
					imgsortorder3: '', //排序条件3
					isNoCaseno: '', //是否查询无受理号的补充文件（当busiType为时）
					isPrint: '', //是否列印（有效性）
					productType: '', //险种类型
					purview: '', //查询权限（query和）
					type: '' //（业务类型访问类型 general\nb\pos\clm）
				},
				optionstableData: [], //文件类型数据列表
				docTypeMap: {}, //文件类型对象
				multipleSelection: [],
				isNoCasenoShowValue: false, //当查询业务类型为pos（保全）时，查询条件【是否查询无受理号的补充文件】出现
				editCheckId: '', //tree树只选一个
				tableDataList: [], //
				//查看影像备注信息——查询影像列表
				imageExtendParam: {
					busitype: '',
					doflag: '',
					itemid: '',
					remark: ''
				},
				policyNOs: [],
				//用于改变各个元素的可编辑状态
				disableParam: {
					// busitype
					sbusiType: false, //搜索辅助条件——文件类型
					busiType: false,

					policyNO: false,
					busiNo: false,
					subbusitype: false,
					productType: false,
					docTyp: false,
					stockID: false,
					groupNo: false,
					isPrint: false,
					ishcprint: false,
					version: false,
					scanDate: false,
					scanTime: false,

					btnCopy: false,
					btnModify: false,
					btnDel: false,
					//财务影像管理
					scansite: false,
					srepdate: false,
					sagentid: false,
					sagentname: false,
					sbankname: false
				},
				//影像信息
				imagInfoParamshandle: {
					busiType: '', //业务类型
					policyNo: '', //保单号
					busiNo: '', //受理号
					subbusitype: '', //是否新受理（空时候显示空，不为空时显示该值；子业务类型）
					productType: '', //险种类型
					docTyp: '', //单证类型
					stockID: '', //存仓号
					groupNo: '', //组号
					scanDate: '', //扫描日期
					scanTime: '', //扫描时间
					updateflag: '', //
					isPrint: '', //是否列印（1是，0否）
					ishcprint: '', //是否打印
					version: '', //版本
					itemid: '', //
					pidString: '', //
					company: '', //
					repdate: '', //
					agentNo: '', //
					agentName: '', //

					stype: '',
					scansite: '',
					srepdate: '',
					sagentid: '',
					sagentname: '',
					sbankname: ''
				},
				userInfo: {},
				multipleTable: [],
				memoListTableData: [], //查看影像备注信息
				updateRecordTableData: [], //查看影像修改记录
				remarkInfo: '', //修改备注信息
				imagInfoParams: {
					busiType: '', //业务类型
					policyNo: '', //保单号
					busiNo: '', //受理号
					subbusitype: '', //是否新受理（空时候显示空，不为空时显示该值；子业务类型）
					productType: '', //险种类型
					docTyp: '', //单证类型
					stockID: '', //存仓号
					groupNo: '', //组号
					scanDate: '', //扫描日期
					scanTime: '', //扫描时间
					updateflag: '', //
					isPrint: '', //是否列印（1是，0否）
					ishcprint: '', //是否打印
					version: '', //版本
					itemid: '', //
					pidString: '', //
					company: '', //
					repdate: '', //
					agentNo: '', //
					agentName: '' //
				}, //影像信息
				input: '',
				disabled: false,
				activeNames: ['1'],
				memoListDialog: false, //默认隐藏 备注列表弹框
				addMemoInfoDialog: false, //默认隐藏 备注信息弹框
				updateRecordDialog: false, //默认隐藏 修改记录弹框
				imagInfoDialog: false, //默认隐藏 影像信息修改弹框
				treeData: [], //tree信息存储对象
				loading: false,
				//需要给分页组件传的信息
				paginations: {
					total: 0, // 总数
					pageIndex: 1, // 当前位于哪页
					pageSize: 10, // 1页显示多少条
					pageSizes: [5, 10, 15, 20], //每页显示多少条
					layout: "total, sizes, prev, pager, next, jumper" // 翻页属性
				},
				pickerOptions1: {
					disabledDate(time) {
						return time.getTime() > Date.now();
					}
				},
				MemoInfoDialogShow: true, //影像备注列表显示
				MemoInfoDialogHistory: false, //影像历史备注显示
				sNoteLog: '', //历史备注信息
				judgeParam: {
					stype: 'nb', //文件类型
					spurview: 'low' //查看权限
				}
			}
		},
		created() {},
		mounted() {
			//分支公司
			getSsyOrgMap().then(data => this.ssyMap = data);
			getDocTypeMap().then(data => this.docTypeMap = data);
			this.showImage_init();
			this.init();
		},
		props: {
			drawer: {
				type: Boolean,
				default: false
			},
			applnum: { // 受理号
				type: String,
				deault: ""
			},
			policyNO: { // 保单号
				type: String,
				deault: ""
			},
			docType: { // 文件类型
				type: String,
				deault: ""
			},
			busiType: { // 业务类型： NB/POS/CLM
				type: String,
				deault: "NB"
			},
		},
		methods: {
			init() {
				this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
				if (this.userInfo == null) { // TODO 本地测试临时使用
					this.userInfo = {
						account: 'CHNT001755'
					};
				}
				//this.searchParams.busiType = "NB";
				this.disableParam.busiType = true;
			},
			handleClose(done) {
				this.$emit('close', this.drawer);
			},
			// 综合查询列表
			//文件类型选项方法
			handleSelectionChange(val) {
				this.multipleTable = val;
			},

			//文件类型选择
			selectDocType() {
				console.log("文件类型：" + this.docTypeMap.data);
				console.log("分支公司：" + this.ssyMap.data);
			},
			checkChange(item, node, self) {
				if (node == true) {
					this.editCheckId = item.id;
					this.$refs.tree.setCheckedKeys([item.id]);
				} else {
					if (this.editCheckId == item.id) {
						this.$refs.tree.setCheckedKeys([item.id]);
					}
				}
			},
			nodeClick(item, node, self) {
				if (this.label != undefined && this.label !='') {
					if (this.label != item.label) {
						this.paginations.pageIndex = 1;
						this.paginations.pageSize = 10;
					}
				}
				this.label = item.label;
				this.item = item;
				//单击查询详情时，将clm_busitype置为空，防止死循环
				this.searchParams.clmBusiType ='';
				this.paginations.total = 0;
				var pageSize = this.paginations.pageSize;
				var pageNumber = this.paginations.pageIndex;
				this.editCheckId = item.id;
				setTimeout(() => {
        if (item.num != 0) {
				this.$refs.tree.setCheckedKeys([item.id]);
				var userId = this.userInfo.account;
				this.$store.dispatch('loading/CHANGE_LOADING', true);
				if (this.label.indexOf("案件号") >=0) {
					this.searchParams.policyNO = '';
					this.searchParams.busiNO = item.busiNo;
				} else {
					this.searchParams.policyNO = item.policyNo;
					this.searchParams.busiNO = '';
				}
				this.searchParams.busiType = item.busiType; 
				this.searchParams['doflag'] = "image";
				this.searchParams.stype = this.judgeParam.stype;
				this.tableDataList = [];
				ImageQuerySearch(this.searchParams, userId, pageSize, pageNumber).then(res => {
					this.$store.dispatch('loading/CHANGE_LOADING', false)
					if (res.resultCode == constant.SUCCESS && res.resBody) {
						this.treeDataModuleShow = true;
						this.tableDataModuleShow = false;
						const tableDataList_s = [];
						for (var i = 0; i < res.resBody.imageList.length; i++) {
							const obj = {
								serno: res.resBody.imageList[i].serno,
								docTyp: res.resBody.imageList[i].docTyp,
								stockID: res.resBody.imageList[i].stockID,
								groupNo: res.resBody.imageList[i].groupNo,
								scanDate: res.resBody.imageList[i].scanDate,
								scanTime: res.resBody.imageList[i].scanTime,
								subbusitype: res.resBody.imageList[i].subbusitype,
								isPrint: res.resBody.imageList[i].isPrint,
								remark: res.resBody.imageList[i].remark,
								busiType: res.resBody.imageList[i].busiType,
								itemid: res.resBody.imageList[i].itemid,
								policyNo: res.resBody.imageList[i].policyNo,
								busiNo: res.resBody.imageList[i].busiNo,
								productType: res.resBody.imageList[i].productType,
								ishcprint: res.resBody.imageList[i].ishcprint,
								version: res.resBody.imageList[i].version,
								agentNo: res.resBody.imageList[i].agentNo,
								updateflag: res.resBody.imageList[i].updateflag,

								imgServerUrl: res.imageServerUrl
							}
							tableDataList_s.push(obj);
						}
						this.tableDataList = tableDataList_s;
						if (tableDataList_s.length > 0) {
							this.paginations.total = res.resBody.total;
						}
					}
				}).catch(err => {
					this.$store.dispatch('loading/CHANGE_LOADING', false);
				})
			}
			}, 100)
			},
			// 查询列表
			getList() {
				let count = 0;
				if (this.applnum == null || this.applnum === "") {
					count++;
				}
				if (this.policyNO == null || this.policyNO === "") {
					count++;
				}
				if (count === 0) {
					return false;
				}

				const userId = this.userInfo.account;
				this.$store.dispatch('loading/CHANGE_LOADING', true);

				console.log("进入判断查询条件类型");
				if (this.docType != null && this.docType !== "") {
					this.searchParams.docType = this.docType;
				}
				if (this.applnum != null && this.applnum !== "") {
					this.searchParams.busiNO = this.applnum;
				}
				if (this.policyNO != null && this.policyNO !== "") {
					this.searchParams.policyNO = this.policyNO;
				}
				this.searchParams.busiType = 'ALL'; // 默认为核保业务
				this.searchParams.stype = this.judgeParam.stype;
				this.searchParams.spurview = this.judgeParam.spurview;
				this.searchParams['doflag'] = "image";

				this.tableDataList = [];
				this.treeData = [];
				if (this.busiType == 'clm_uw') {
					this.searchParams['clmBusiType'] = "clm_uw";
				}
				ImageQuerySearch(this.searchParams, userId, this.paginations.pageSize, this.paginations.pageIndex).then(res => {
					this.$store.dispatch('loading/CHANGE_LOADING', false)
					if (res.resultCode == constant.SUCCESS && res.resBody) {
						if (res.strDoFlag == "image" || res.strDoFlag == "caseimage") {
							let tableDataList_t = [];
							let treeData_List = [];
							let busiNo_Map = {}; // 根据保单号划分
							let imglist = res.resBody.imageList;
							for (var i = 0; i < imglist.length; i++) {
								const busiNo = imglist[i].busiNo;
								const policyNo = imglist[i].policyNo;
								const busiType = imglist[i].busiType;
								let busiName = '未知业务';
								if ('NB' == busiType || 'nb' == busiType) {
									busiName = '核保业务';
								} else if ('POS' == busiType || 'pos' == busiType) {
									busiName = '保全业务';
								} else if ('CLM' == busiType || 'clm' == busiType) {
									busiName = '理赔业务';
								} else if ('FIN' == busiType || 'fin' == busiType) {
									busiName = '财务业务';
								}
								let busiNoMapElement = busiNo_Map[busiNo];
								if (busiNoMapElement) {
									// 已存在 同一个业务层存在相同保单号
									let isExist = -1;
									//是否存在业务层名字
									let isExistsLabel = false;
									for (let j = 0; j < busiNoMapElement.children.length; j++) {
										let child = busiNoMapElement.children[j];
										if (child.label == busiName) {
											isExistsLabel = true;
											for (let k = 0; k < child.children.length; k++) {
												if (busiName == '理赔业务') {
													if (child.children[k].busiNo == busiNo) {
														isExist = k;
														break;
													}
												} else {
													if (child.children[k].policyNo == policyNo) {
														isExist = k;
														break;
													}
												}

											}
											if (isExist != -1) {
												break;
											}
										}
									}
									if (isExist != -1) {
										continue;
									} else {
										// 不存在，需新 封装数层 业务类型
										// 封装树层 业务类型
										let busiType_C ;
										if (!isExistsLabel) {
											busiType_C = {	
												label: busiName,
												id: 'd' + i,
												busiType: busiType,
												disabled: true,
												children: []
											};
										}
										let label = '';
										if (busiName == '理赔业务') {
											label = " 案件号：" + busiNo
										} else {
											label = ' 保单号：' + policyNo;
										}
										let busiNO_C_two = {
											label: label,
											id: 'c' + i,
											busiNo: imglist[i].busiNo,
											busiType: busiType,
											policyNo: policyNo
										};
										if (!isExistsLabel) {
											busiType_C.children.push(busiNO_C_two);
											busiNoMapElement.children.push(busiType_C);
										} else {
											for (let m = 0; m < busiNoMapElement.children.length; m++) {
												if (busiNoMapElement.children[m].label == busiName) {
													busiNoMapElement.children[m].children.push(busiNO_C_two);
													break;
												}	
											}	
										}
										busiNo_Map[busiNo] = busiNoMapElement;
									}
								} else {
									// 不存在 需新封装数层 保单号
									// 封装树层 保单号
									let busiNo_C = {
										label: ' 受理号: ' + imglist[i].busiNo,
										id: 'a' + i,
										disabled: true,
										children: []
									};
									// 封装树层 业务类型
									let busiType_C = {
										label: busiName,
										id: 'd' + i,
										busiType: busiType,
										disabled: true,
										children: []
									};
									let label = '';
									if (busiName == '理赔业务') {
										label = " 案件号：" + busiNo
									} else {
										label = ' 保单号：' + policyNo;
									}
									// 封装树层 受理号
									let busiNo_C_two = {
										label: label,
										id: 'c' + i,
										busiNo: imglist[i].busiNo,
										busiType: busiType,
										policyNo: policyNo
									};
									busiType_C.children.push(busiNo_C_two);
									busiNo_C.children.push(busiType_C);
									busiNo_Map[busiNo] = busiNo_C;
								}
							}
							for (const policyNo_one in busiNo_Map) {
								treeData_List.push(busiNo_Map[policyNo_one]);
							}

							this.treeData = treeData_List;
							// 只有一条数据时，默认读取影像列表
						  if (res.resBody.length >= 1) {
						  	const itemParam = {
						  		label: ' 案件号：' + res.resBody[0].busiNo,
						  		id: 'c0',
						  		busiNo: res.resBody[0].busiNo,
						  		busiType: res.resBody[0].busiType,
						  		policyNo: res.resBody[0].policyNo,
						  		docType: this.searchParams.sdocType.toString(),
						  		company: res.resBody[0].company,
						  		policyer: res.resBody[0].policyer,
						  		insured: res.resBody[0].insured,
						  		branch: res.resBody[0].branch
						  	}
						  	this.nodeClick(itemParam);
						  } else {
						  	let itemParam = {
						  		label: ' 案件号：' + this.searchParams.busiNO,
						  		id: 'c0',
						  		busiNo: this.searchParams.busiNO,
						  		busiType: this.searchParams.busiType,
						  		policyNo: this.searchParams.policyNO,
						  		docType: this.searchParams.sdocType.toString(),
						  		policyer: this.searchParams.policyer,
						  		insured: this.searchParams.insured,
						  	}
						  	this.nodeClick(itemParam);
						  }
						}
					}
				}).catch(err => {
					this.$store.dispatch('loading/CHANGE_LOADING', false);
				})
			},
			//判断查询条件类型
			judgeDoflag() {
				//console.log("进入判断查询条件类型");
				var isInput = false;
				var queryflag = "image";
				//影像条件查询
				if (this.searchParams.stockID != '' | this.searchParams.groupNO != '' |
					this.searchParams.begintime != '' | this.searchParams.serno != '') {
					isInput = true;
				}
				console.log(this.searchParams.policyno16);
				if (this.searchParams.policyno16 != '') {
					if (this.searchParams.policyno16.value.length() != 16) {
						this.$message({
							message: '短期险保单号查询条件输入不正确，请重输！',
							type: 'warning'
						});
						return;
					}
					isInput = true;
				}
				//业务条件查询
				if (this.searchParams.busiNO != '' | this.searchParams.policyNO != '' |
					this.searchParams.policyer != '' | this.searchParams.insured != '') {
					queryflag = "tree";
					isInput = true;
				}
				this.searchParams.doflag = queryflag;

				//特殊查询：POS无受理号的补充文件的查询
				if (this.searchParams.isNoCaseno.value == "Y") {
					if (!(this.searchParams.stockID.value != "" || this.searchParams.groupNO.value != "" || this.searchParams.begintime
							.value != "")) {
						this.$message({
							message: '查询POS无受理号的补充文件，影像查询条件至少要有一个，请重输！',
							type: 'warning'
						});
						return;
					}
					if (this.searchParams.busiNO.value != "") {
						this.$message({
							message: '查询POS无受理号的补充文件，不需要输入受理号查询条件，请重输！',
							type: 'warning'
						});
						return;
					}
				}
				if (!isInput) {
					this.$message({
						message: '正在查询影像信息，请稍候...',
						type: 'warning'
					});
				} else {
					//alert("查询条件中没有必选条件，必选条件至少要有一个，请重输！");
				}
			},
			isNoCasenoShow() {
				if (this.searchParams.busiType == 'POS') {
					this.isNoCasenoShowValue = true;
				} else {
					this.isisNoCasenoShowValue = false;
				}
			},
      // 审计日志需求  --lvjg 20211217
      recordAuditLogInfo(busMod, multipleTable) {
        let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
        // 时间格式 yyyymmddhhMMss
        var dateStr = formatDate(new Date(), 2);
        var businessInfos = [];
        for (var i = 0; i < multipleTable.length; i++) {
          businessInfos.push({"applNum": multipleTable[i].busiNo
            , "chdrNum": multipleTable[i].policyNo
            , "otherNum": multipleTable[i].serno});
        }
        let params = {
          "head": {
            "sysID": "ILMP",
            "password": "lHW5bPjxPnIIoSR5OFZE9A=="
          },
          "body": {
            "userNum": userInfo.account,
            "optDate": dateStr.substr(0,8),
            "optTime": dateStr.substr(8),
            "userIP": "",
            "userMachine": "",
            "menuName": busMod,
            "funcDesc": "查看客户影像资料",
            "busAction": "R",
            "businessInfos": businessInfos,
            "sensiDesc": busMod + "查看客户影像",
            "remark": ""
          }
        };

        recordLogInfo(params).then(res => {
          console.log(res);
        }).catch(err => {
          console.log(err);
        });
      },
			bathchShow_newObject() {
				console.log("this.multipleTable")
				console.log(this.multipleTable);

        // 审计日志需求  --lvjg 20211217
        this.recordAuditLogInfo("契约理赔二核", this.multipleTable);

				if (this.multipleTable.length > 0) {
					// this.multipleTable.val[0];
					console.log(this.multipleTable[0]);

					let imageDisplay;
					let str = "";
					for (var i = 0; i < this.multipleTable.length; i++) {
						if (str == "") {
							str = this.multipleTable[i].busiType + "," + this.multipleTable[i].itemid;
						} else {
							str = str + "|" + this.multipleTable[i].busiType + "," + this.multipleTable[i].itemid;
						}
					}
					try {
						console.log(str);
						if (str != ",") {
							/*
							imageDisplay = document.getElementById("imageDisplay");
							imageDisplay.DisplayFile(str, this.multipleTable[0].imgServerUrl);
							*/ 
							/* google访问ie内核修改 ---------- sunline注册表模式*/
    						sunCMImage.showImage(str,this.multipleTable[0].imgServerUrl);
						}
					} catch (e) {
						this.$message.error('页面加载错误：' + e);
					}

				} else {
					this.$message({
						message: '至少选择一条才可查看! ',
						type: 'warning'
					});
				}
			},
			showImage_init() {
				//kaka 预加载影像查看组件
				let imgObjDiv = document.getElementById("imgObjDiv");
				imgObjDiv.innerHTML = "<object id='imageDisplay' classid='clsid:DF02961E-E2F3-41a6-AACB-010EF4A90F9F'></object>";
				//kaka 预加载影像查看组件
			},
			showImage_newObject(item) {

        // 审计日志需求  --lvjg 20211217
        var multipleTable = [item];
        console.log("影像信息-->", multipleTable);
        this.recordAuditLogInfo("契约理赔二核", multipleTable);

				let imageDisplay;
				// var imageDisplay;
				const str = item.busiType + "," + item.itemid; // busiType,itemid
				try {
					if (str != ",") {
						/*
						imageDisplay = document.getElementById("imageDisplay");
						imageDisplay.DisplayFile(str, item.imgServerUrl); // imgServerUrl
						*/ 
						/* google访问ie内核修改 ---------- sunline注册表模式*/
						sunCMImage.showImage(str,item.imgServerUrl);
					}
				} catch (e) {
					this.$message.error('页面加载错误：' + e);
				}
			},
			//查看影像备注信息
			memoGo(busiType, itemid) {
				this.memoListDialog = true;
				this.MemoInfoDialogHistory = false;
				this.MemoInfoDialogShow = true;
				this.addMemoInfoDialog = false

				// var userInfo = JSON.parse(getToken(getToken(constant.TOKEN)));
				// var username = userInfo.userKeyInfo.id;
				//console.log(username);
				// var userId = username;
				var userId = this.userInfo.account;
				this.imageExtendParam.doflag = 'querymemo';
				this.imageExtendParam.busitype = busiType;
				this.imageExtendParam.itemid = itemid;
				this.$store.dispatch('loading/CHANGE_LOADING', true)
				// console.log("进入查看影像备注信息");
				ImageExtendCheck(this.imageExtendParam, userId).then(res => {
					this.$store.dispatch('loading/CHANGE_LOADING', false)
					console.log(res.resBody);
					if (res.resultCode == constant.SUCCESS && res.resBody) {
						const memoListTableData_s = [];
						for (var i = 0; i < res.resBody.length; i++) {
							const obj = {
								serialNumber: i + 1,
								time: res.resBody[i].time,
								remark: res.resBody[i].remark,
								userid: res.resBody[i].userid,
								busitype: res.busitype,
								itemid: res.itemid,
							}
							memoListTableData_s.push(obj);
						}
						this.memoListTableData = memoListTableData_s;
					}
				}).catch(err => {
					// console.log("搜索结果出来了，失败了么");
					this.$store.dispatch('loading/CHANGE_LOADING', false);
				})
			},
			memoGoHistory() {
				// this.memoListDialog = true;
				this.MemoInfoDialogHistory = true;
				// this.MemoInfoDialogShow = false;
				// this.addMemoInfoDialog=false

				// var userInfo = JSON.parse(getToken(getToken(constant.TOKEN)));
				// var username = userInfo.userKeyInfo.id;
				//console.log(username);
				// var userId = username;
				var userId = this.userInfo.account;
				this.imageExtendParam.doflag = 'notelog';
				// this.imageExtendParam.busitype = this.memoListTableData[0].busitype;
				// this.imageExtendParam.itemid = this.memoListTableData[0].itemid;
				this.$store.dispatch('loading/CHANGE_LOADING', true)
				// console.log("进入查看影像备注信息");
				ImageExtendCheck(this.imageExtendParam, userId).then(res => {
					this.$store.dispatch('loading/CHANGE_LOADING', false)
					console.log(res.resBody);
					if (res.resultCode == constant.SUCCESS && res.resBody) {
						this.sNoteLog = res.resBody.sNoteLog;
						if (this.sNoteLog == null || this.sNoteLog == "") {
							this.sNoteLog = "无历史备注";
						}
					}
				}).catch(err => {
					// console.log("搜索结果出来了，失败了么");
					this.$store.dispatch('loading/CHANGE_LOADING', false);
				})
			},
			//新增备注信息
			addMemoInfo() {
				this.MemoInfoDialogHistory = false;
				this.MemoInfoDialogShow = true;
				if (typeof this.remarkInfo == "undefined" || this.remarkInfo == null || this.remarkInfo == "") {
					this.$message({
						message: '请输入备注信息! ',
						type: 'warning'
					});
				} else {
					//拦截备注长度，不能超过数据库的256个字符长度
					let length = strLength(this.remarkInfo);
					if(length > 254){
						this.$message({
						  message: '备注信息长度超过256个字符，请重新输入 ',
						  type: 'warning'
						});
						return;
					}
					// console.log("新增备注信息");
					console.log(this.remarkInfo);

					// var userInfo = JSON.parse(getToken(getToken(constant.TOKEN)));
					// var username = userInfo.userKeyInfo.id;
					//console.log(username);
					// var userId = username;
					var userId = this.userInfo.account;
					this.imageExtendParam.doflag = 'addmemo';
					// this.imageExtendParam.busitype = this.memoListTableData[0].busitype;
					// this.imageExtendParam.itemid = this.memoListTableData[0].itemid;
					//this.imageExtendParam.remark = this.remarkInfo;
					this.imageExtendParam.remark = this.remarkInfo;
					this.$store.dispatch('loading/CHANGE_LOADING', true)
					console.log("进入查看影像修改记录");
					ImageExtendCheck(this.imageExtendParam, userId).then(res => {
						this.$store.dispatch('loading/CHANGE_LOADING', false)
						console.log(res.resBody);
						if (res.resultCode == constant.SUCCESS && res.resBody) {
							const memoListTableData_s = [];
							for (var i = 0; i < res.resBody.length; i++) {
								const obj = {
									serialNumber: i + 1,
									time: res.resBody[i].time,
									remark: res.resBody[i].remark,
									userid: res.resBody[i].userid,
									busitype: res.busitype,
									itemid: res.itemid,
								}
								memoListTableData_s.push(obj);
							}
							this.memoListTableData = memoListTableData_s;
						}
					}).catch(err => {
						// console.log("搜索结果出来了，失败了么");
						this.$store.dispatch('loading/CHANGE_LOADING', false);
					})
					this.addMemoInfoDialog = false;
				}

			},

			//查看影像修改记录
			updateRecordGo(busiType, itemid) {
				this.updateRecordDialog = true;

				// var userInfo = JSON.parse(getToken(getToken(constant.TOKEN)));
				// var username = userInfo.userKeyInfo.id;
				//console.log(username);
				// var userId = username;
				var userId = this.userInfo.account;
				this.imageExtendParam.doflag = 'modihistory';
				this.imageExtendParam.busitype = busiType;
				this.imageExtendParam.itemid = itemid;
				this.$store.dispatch('loading/CHANGE_LOADING', true)
				// console.log("进入查看影像修改记录");
				ImageExtendCheck(this.imageExtendParam, userId).then(res => {
					this.$store.dispatch('loading/CHANGE_LOADING', false)
					console.log(res.resBody);
					if (res.resultCode == constant.SUCCESS && res.resBody) {
						const updateRecordTableData_s = [];
						for (var i = 0; i < res.resBody.length; i++) {
							const obj = {
								serialNumber: i + 1,
								fielddesc: res.resBody[i].fielddesc,
								srcvalue: res.resBody[i].srcvalue,
								modusrid: res.resBody[i].modusrid,
								modvalue: res.resBody[i].modvalue,
								modtime: res.resBody[i].modtime
							}
							updateRecordTableData_s.push(obj);
						}
						this.updateRecordTableData = updateRecordTableData_s;
					}
				}).catch(err => {
					// console.log("搜索结果出来了，失败了么");
					this.$store.dispatch('loading/CHANGE_LOADING', false);
				})

			},
			imagInfoGo(busiType,
				policyNo,
				busiNo,
				subbusitype,
				productType,
				docTyp,
				stockID,
				groupNo,
				scanDate,
				scanTime,
				isPrint,
				ishcprint,
				version,
				itemid,
				agentNo,
				updateflag,
				company) {
				this.imagInfoDialog = true;
				this.purviewForm();
				this.imagInfoParams.busiType = busiType;
				this.imagInfoParams.policyNo = policyNo;
				this.imagInfoParams.busiNo = busiNo;
				this.imagInfoParams.subbusitype = subbusitype;
				this.imagInfoParams.docTyp = docTyp;
				this.imagInfoParams.stockID = stockID;
				this.imagInfoParams.groupNo = groupNo;
				this.imagInfoParams.scanDate = scanDate;
				this.imagInfoParams.scanTime = scanTime;
				this.imagInfoParams.isPrint = isPrint;
				this.imagInfoParams.ishcprint = ishcprint;
				this.imagInfoParams.version = version;
				this.imagInfoParams.itemid = itemid;
				this.imagInfoParams.agentNo = agentNo;
				this.imagInfoParams.updateflag = updateflag;
				this.imagInfoParams.company = company;

				this.imagInfoParamshandle.busiType = busiType;
				this.imagInfoParamshandle.policyNo = policyNo;
				this.imagInfoParamshandle.busiNo = busiNo;
				this.imagInfoParamshandle.subbusitype = subbusitype;
				this.imagInfoParamshandle.docTyp = docTyp;
				this.imagInfoParamshandle.stockID = stockID;
				this.imagInfoParamshandle.groupNo = groupNo;
				this.imagInfoParamshandle.scanDate = scanDate;
				this.imagInfoParamshandle.scanTime = scanTime;
				this.imagInfoParamshandle.isPrint = isPrint;
				this.imagInfoParamshandle.ishcprint = ishcprint;
				this.imagInfoParamshandle.version = version;
				this.imagInfoParamshandle.itemid = itemid;
				this.imagInfoParamshandle.agentNo = agentNo;
				this.imagInfoParamshandle.updateflag = updateflag;
				this.imagInfoParamshandle.company = company;

				if (productType == null || productType == "null") {
					this.imagInfoParams.productType = "";
					this.imagInfoParamshandle.productType = "";
				} else {
					this.imagInfoParams.productType = productType;
					this.imagInfoParamshandle.productType = productType;
				}
			},
			//影像信息——拷贝、修改、删除
			imageInfoAlter(param) {
				this.enableForm();
				var userId = this.userInfo.account;
				Object.keys(this.imagInfoParamshandle).forEach(key => {
					this.imagInfoParamshandle[key] = this.imagInfoParams[key]
				})
				this.imagInfoParamshandle.stype = param;
				this.imagInfoParamshandle.productType = this.imagInfoParamshandle.productType;
				this.imagInfoParamshandle.docTyp = this.imagInfoParamshandle.docTyp;
				ImageExtendAlter(this.imagInfoParamshandle, userId).then(res => {
					this.$store.dispatch('loading/CHANGE_LOADING', false)
					if (res.resultCode == constant.SUCCESS) {
						if (param == 'copy') {
							this.$message({
								message: '拷贝影像执行成功！',
								type: 'success'
							});
						} else if (param == 'modify') {
							this.$message({
								message: '修改影像索引成功！',
								type: 'success'
							});
						} else if (param == 'del') {
							this.$message({
								message: '删除影像执行成功！',
								type: 'success'
							});
						}
					}
					this.disableForm();
					// 关掉影像信息弹框
					this.imagInfoDialog = false;
					// 刷新列表
					this.getList();
				}).catch(err => {
					// console.log("搜索结果出来了，失败了么");
					this.imagInfoDialog = false;
					this.$store.dispatch('loading/CHANGE_LOADING', false);

				})
			},
			imageInfoAlterDelJudge(param) {
				this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.imageInfoAlter(param);
				}).catch(() => {
					this.$message({
						type: 'info',
						message: '已取消删除'
					});
					return;
				});
			},
			//影像信息——修改——权限控制
			purviewForm() {
				this.disableParam.busiType = true;
				//新契约管理
				if (this.judgeParam.stype == "nb" || this.judgeParam.stype == "nbdocflow" ||
					this.judgeParam.stype == "hbdocflow_p" || this.judgeParam.stype == "hbdocflow") {
					if (this.judgeParam.spurview == "low") {
						//新契约管理-普通权限
						this.disableParam.policyNo = true;
						this.disableParam.busiNo = true;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = true;
						this.disableParam.docTyp = true;
						this.disableParam.stockID = true;
						this.disableParam.groupNo = true;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = true;
						this.disableParam.version = true;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = true;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;
					} else if (this.judgeParam.spurview == "mid") {
						//新契约管理-中级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = true;
						this.disableParam.version = false;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = false;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;
					} else if (this.judgeParam.spurview == "high") {
						//新契约管理-高级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = true;
						this.disableParam.version = false;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = false;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = false;
					}
				} else if (this.judgeParam.stype == "pos" || this.judgeParam.stype == "docflow" || this.judgeParam.stype ==
					"posuser") {
					//保全管理
					if (this.judgeParam.stype == "low") {
						//保全管理——普通权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = true;
						this.disableParam.subbusitype = false;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = false;
						this.disableParam.version = false;
						this.disableParam.scanDate = false;
						this.disableParam.scanTime = false;

						this.disableParam.btnCopy = true;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;
					} else if (this.judgeParam.spurview == "mid") {
						//保全管理——中级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = false;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = false;
						this.disableParam.version = false;
						this.disableParam.scanDate = false;
						this.disableParam.scanTime = false;

						this.disableParam.btnCopy = false;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;
					} else if (this.judgeParam.spurview == "high") {
						//保全管理——高级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = false;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = false;
						this.disableParam.version = false;
						this.disableParam.scanDate = false;
						this.disableParam.scanTime = false;

						this.disableParam.btnCopy = false;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = false;
					}
				} else if (this.judgeParam.stype == "clm") {
					//理赔管理
					if (this.judgeParam.stype == "low") {
						//理赔管理——普通权限
						this.disableParam.policyNo = true;
						this.disableParam.busiNo = true;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = true;
						this.disableParam.docTyp = true;
						this.disableParam.stockID = true;
						this.disableParam.groupNo = true;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = true;
						this.disableParam.version = true;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = true;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;
					} else if (this.judgeParam.spurview == "mid") {
						//理赔管理——中级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = false;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = false;
						this.disableParam.version = false;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = false;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;
					} else if (this.judgeParam.spurview == "high") {
						//理赔管理——高级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = false;
						this.disableParam.productType = false;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = false;
						this.disableParam.isPrint = false;
						this.disableParam.ishcprint = false;
						this.disableParam.version = false;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = false;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = false;
					}
				} else if (this.judgeParam.stype == "fin") {
					//财务影像管理
					if (this.judgeParam.stype == "low") {
						//财务影像管理——普通权限
						this.disableParam.policyNo = true;
						this.disableParam.busiNo = true;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = true;
						this.disableParam.docTyp = true;
						this.disableParam.stockID = true;
						this.disableParam.groupNo = true;
						this.disableParam.isPrint = true;
						this.disableParam.ishcprint = true;
						this.disableParam.version = true;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = true;
						this.disableParam.btnModify = true;
						this.disableParam.btnDel = true;

						this.disableParam.scansite = true;
						this.disableParam.srepdate = true;
						this.disableParam.sagentid = true;
						this.disableParam.sagentname = true;
						this.disableParam.sbankname = true;
					} else if (this.judgeParam.spurview == "mid") {
						//财务影像管理——中级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = true;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = true;
						this.disableParam.isPrint = true;
						this.disableParam.ishcprint = true;
						this.disableParam.version = false;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = true;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = true;

						this.disableParam.scansite = false;
						this.disableParam.srepdate = false;
						this.disableParam.sagentid = false;
						this.disableParam.sagentname = false;
						this.disableParam.sbankname = false;
					} else if (this.judgeParam.spurview == "high") {
						//财务影像管理——高级权限
						this.disableParam.policyNo = false;
						this.disableParam.busiNo = false;
						this.disableParam.subbusitype = true;
						this.disableParam.productType = true;
						this.disableParam.docTyp = false;
						this.disableParam.stockID = false;
						this.disableParam.groupNo = true;
						this.disableParam.isPrint = true;
						this.disableParam.ishcprint = true;
						this.disableParam.version = false;
						this.disableParam.scanDate = true;
						this.disableParam.scanTime = true;

						this.disableParam.btnCopy = true;
						this.disableParam.btnModify = false;
						this.disableParam.btnDel = false;

						this.disableParam.scansite = false;
						this.disableParam.srepdate = false;
						this.disableParam.sagentid = false;
						this.disableParam.sagentname = false;
						this.disableParam.sbankname = false;
					}
				} else {
					//综合查询
					this.disableParam.policyNo = true;
					this.disableParam.busiNo = true;
					this.disableParam.subbusitype = true;
					this.disableParam.productType = true;
					this.disableParam.docTyp = true;
					this.disableParam.stockID = true;
					this.disableParam.groupNo = true;
					this.disableParam.isPrint = true;
					this.disableParam.ishcprint = true;
					this.disableParam.version = true;
					this.disableParam.scanDate = true;
					this.disableParam.scanTime = true;

					this.disableParam.btnCopy = true;
					this.disableParam.btnModify = true;
					this.disableParam.btnDel = true;
				}
			},
			enableForm() {
				this.disableParam.busiType = false;

				this.disableParam.policyNo = false;
				this.disableParam.busiNo = false;
				this.disableParam.subbusitype = false;
				this.disableParam.productType = false;
				this.disableParam.docTyp = false;
				this.disableParam.stockID = false;
				this.disableParam.groupNo = false;
				this.disableParam.isPrint = false;
				this.disableParam.ishcprint = false;
				this.disableParam.version = false;
				this.disableParam.scanDate = false;
				this.disableParam.scanTime = false;

				this.disableParam.btnCopy = false;
				this.disableParam.btnModify = false;
				this.disableParam.btnDel = false;

			},
			disableForm() {
				this.disableParam.busiType = true;

				this.disableParam.policyNo = true;
				this.disableParam.busiNo = true;
				this.disableParam.subbusitype = true;
				this.disableParam.productType = true;
				this.disableParam.docTyp = true;
				this.disableParam.stockID = true;
				this.disableParam.groupNo = true;
				this.disableParam.isPrint = true;
				this.disableParam.ishcprint = true;
				this.disableParam.version = true;
				this.disableParam.scanDate = true;
				this.disableParam.scanTime = true;

				this.disableParam.btnCopy = true;
				this.disableParam.btnModify = true;
				this.disableParam.btnDel = true;
			},

			// 每页多少条切换
			handleSizeChange(pageSize) {
				this.paginations.pageSize = pageSize;
				this.nodeClick(this.item);;
			},
			// 上下分页
			handleCurrentChange(page) {
				this.paginations.pageIndex = page;
				this.nodeClick(this.item);;
			},
			// 根据条件查询列表
			subGetList() {
				this.judgeDoflag();
				//console.log("搜索条件："+this.searchParams.busiNO);
				this.paginations.pageIndex = 1;
				this.getList();
			},

			showorhide() {
				this.isShow = !this.isShow;
			},
		},
		watch: {
			applnum: function(newValue) {
				if (newValue != undefined && newValue != '') this.getList();
			},
			policyNO: function(newValue) {
				if (newValue != undefined && newValue != '') this.getList();
			},
			/*docType: function (newValue) {
			  if (newValue != undefined && newValue != '') this.docType = newValue;
			},
			busiType: function (newValue) {
			  if (newValue != undefined && newValue != '') this.busiType = newValue;
			}*/
		},

		computed: {
			...mapGetters(['tags']),

		},
		activated() {
			if (this.reload) {
				this.$store.dispatch('loading/CHNAGE_RELOAD', false)
				Object.assign(this.$data, this.$options.data());
			}
		}
	}
</script>

<style lang="less" scoped>
	.fillcontain {
		padding-bottom: 0;
	}

	.contain {
		background: #fff;
		// padding: 10px;
		margin-bottom: 20px;
	}

	.pagination {
		padding: 10px 20px;
		text-align: right;
	}

	.operationIcon {
		// padding: 12px;
		border: 1px solid #e5e5e5;
		border-radius: 50%;
		width: 22px;
		height: 22px;
		display: inline-block;
		cursor: pointer;
		box-shadow: 0 0 3px #f9f9f9;

		.svg-icon {
			font-size: 14px;
			fill: #68a3fc;
		}
	}

	.search_container {
		padding: 20px 20px 0 20px;
		border-top: 1px solid #e1e1e1;
	}
</style>
